package splug.cjk;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.TabHost;

public class BBSCarPool extends TabActivity{
	
	private String id;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setTitle("카풀 게시판");
		
		Bundle b = this.getIntent().getExtras();
		id = String.valueOf(b.getString("ID"));
		
		Intent intent1 = new Intent(this, BBSCarPoolTab1.class);
		b = new Bundle();
		b.putString("ID", id);
		intent1.putExtras(b);
		
		Intent intent2 = new Intent(this, BBSCarPoolTab2.class);
		b = new Bundle();
		b.putString("ID", id);
		intent2.putExtras(b);
		
		final TabHost tabHost = getTabHost();
        LayoutInflater.from(this).inflate(R.layout.bbs_carpool, tabHost.getTabContentView(), true);

        tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator("태워드립니다",getResources().getDrawable(R.drawable.cc))
                .setContent(intent1
                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
        tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator("태워주세요",getResources().getDrawable(R.drawable.dd))
                .setContent(intent2
                .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)));
	}
}
